#pragma once
# include <opencv2/opencv.hpp>
# include <opencv2/dnn.hpp>
# include "classification.h"
# include <onnxruntime_cxx_api.h>
class onnxruntime
{
protected:
	Ort::Env env_;
	Ort::SessionOptions session_options_;
	Ort::Session session_{ nullptr };
	Ort::RunOptions run_options_{ nullptr };

	std::vector<Ort::Value> input_tensors_;


	std::vector<const char*> input_node_names_;
	std::vector<int64_t> input_node_dims_;
	std::vector<int64_t> output_node_dims_;
	size_t input_tensor_size_{ 1 };

	std::vector<const char*> out_node_names_;
	size_t out_tensor_size_{ 1 };
	cv::Size input_size;
	int image_h;
	int image_w;


public:
	onnxruntime() = delete;
	onnxruntime(std::wstring model_path, int num_threads, std::vector<int64_t> input_node_dims);
	void predict(cv::Mat& src);
	
};